import { IMenuExtraPath, IMenuRelevants, IUaaMenu } from '../lib/types'

let menus: IUaaMenu[] = []

if (process.env.REACT_APP_ENV === 'local') {
  menus = [
    {
      customId: 'home_page',
      text: '首页',
      link: '/',
      icon: 'home'
    },
    {
      customId: 'TO_DO_LIST',
      text: '我的待办',
      link: '/todo/list',
      icon: 'audit',
      type: 'INNER_LINK',
      items: [
      ]
    },
    {
      customId: 'thirdparty_execute_case_ok',
      text: '执行案确认',
      link: '/CaseConfirmation',
      icon: 'audit',
      items: [
        {
          customId: 'case_confirmation_record',
          text: '执行案确认记录',
          link: '/CaseConfirmation/Record',
          // icon: 'calendar'
        }
      ]
    },
    {
      customId: 'announcement_management',
      text: '公告管理',
      link: '/AnnouncementManagement',
      icon: 'notification',
      items: [
        {
          customId: 'customer_dealer_notice_manager',
          text: '公告管理',
          link: '/AnnouncementManagement/List',
          // icon: 'file_protect'
        },
        {
          customId: 'customer_dealer_notice_class_manager',
          text: '公告分类管理',
          link: '/AnnouncementManagement/classification',
          // icon: 'sound'
        }
      ]
    },
    {
      customId: 'suggestions',
      text: '投诉建议',
      link: '/Suggestions',
      icon: 'message',
      items: [
        {
          customId: 'customer_dealer_complaint_type_manager',
          text: '投诉建议分类管理',
          link: '/Suggestions/Classification',
          // icon: 'profile'
        },
        {
          customId: 'customer_dealer_complaint_manager',
          text: '投诉建议处理',
          link: '/Suggestions/DealWith',
          // icon: 'picture'
        },
      ]
    },
    {
      customId: 'systemSettings',
      text: '系统设置',
      link: '/systemSettings',
      icon: 'setting',
      items: [
        {
          customId: 'user_system_settings_permissions',
          text: '资金费用查看权限配置',
          link: '/SystemSettings/capitalCost/list',
          // icon: 'profile'
        },
        {
          customId: 'approval_system_settings',
          text: '审批流程管理',
          link: '/systemsettings/approvalProcess/list',
          // icon: 'profile'
        },
        {
          customId: 'system_api_system_settings',
          text: '外部系统API管理',
          link: '/systemsettings/externalSystemApi/list',
          // icon: 'profile'
        },
        {
          customId: 'user_system_settings_general_config',
          text: '通用配置',
          link: '/systemsettings/generalconfig',
          // icon: 'profile'
        },
      ]
    },
    {
      customId: 'user_management',
      text: '用户管理',
      link: '/UserManagement',
      icon: 'user',
      items: [
        {
          customId: 'user_dealer_account_manager',
          text: '经销商账号管理',
          link: '/DealerAccountManagement/List',
          // icon: 'file_protect'
        },
        {
          customId: 'user_lzlj_employee_manager',
          text: '内部员工账号管理',
          link: '/InternalStaffManagement/List',
          // icon: 'sound'
        },
        {
          customId: 'user_dealer_employee_manager',
          text: '经销商员工管理',
          link: '/DealerStaffManagement/List',
          // icon: 'sound'
        },
        {
          customId: 'user_auth_lzlj',
          text: '角色管理',
          link: '/RolePermissions/List',
          // icon: 'sound'
        },
        {
          customId: 'user_auth_dealer',
          text: '经销商角色列表',
          link: '/RolePermissions/List',
          // icon: 'sound'
        }
      ]
    },
    {
      customId: 'ORGANIZATION_MANAGE',
      text: '机构管理',
      link: '/systemSettings',
      icon: 'setting',
      items: [
        {
          customId: 'user_master_data_organization',
          text: '组织机构管理',
          link: '/SystemSettings/capitalCost/list',
          // icon: 'profile'
        },
      ]
    },
    {
      customId: 'CUSTOMER_MANAGE',
      text: '客户管理',
      link: '/systemSettings',
      icon: 'setting',
      items: [
        {
          customId: 'user_customer_manager',
          text: '客户列表',
          link: '/SystemSettings/capitalCost/list',
          // icon: 'profile'
        },
        {
          customId: 'user_customer_settled',
          text: '入驻资质列表',
          link: '/SystemSettings/capitalCost/list',
          // icon: 'profile'
        },
        {
          customId: 'user_customer_areaproducts',
          text: '经销商销售区域与产品维护'
        }
      ]
    },
    {
      customId: 'SYSTEM_MASTER_DATA',
      text: '系统主数据',
      link: '/systemSettings',
      icon: 'setting',
      items: [
        {
          customId: 'stock_master_data_product',
          text: '产品主数据',
          link: '/SystemSettings/capitalCost/list',
          // icon: 'profile'
        },
        {
          customId: 'material_management',
          text: '物料分类主数据',
          link: '/SystemSettings/capitalCost/list',
          // icon: 'profile'
        },
      ]
    },
    {
      customId: 'user_system_menu_manage',
      text: '菜单管理',
      link: '/menus',
      icon: 'setting',
    },
    {
      customId: 'user_system_tpl_manage',
      text: '模板管理',
      link: '/tplmanage',
      icon: 'file',
    },
    {
      customId: 'quota_manage',
      text: '配额管理',
      link: '/systemSettings',
      icon: 'setting',
      items: [
        {
          customId: 'quota_employee_manager_getQuotaTransmit',
          text: '配额下达',
          link: '/SystemSettings/capitalCost/list',
          // icon: 'profile'
        },
        {
          customId: 'import_export_record',
          text: '导入导出记录',
          link: '/SystemSettings/capitalCost/list',
          // icon: 'profile'
        },
        {
          customId: 'manual_inventory_record',
          text: '手工盘点库存记录',
          link: '/SystemSettings/capitalCost/list',
          // icon: 'profile'
        },
        {
          customId: 'quota_transfer',
          text: '配额调整转移',
          link: '/SystemSettings/capitalCost/list',
          // icon: 'profile'
        },
        {
          customId: 'quota_employee_manager_quotaTransmitRequisition',
          text: '配额下达申请单',
          link: '/SystemSettings/capitalCost/list',
          // icon: 'profile'
        },
        {
          customId: 'adjust_the_record',
          text: '调整记录',
          link: '/SystemSettings/capitalCost/list',
          // icon: 'profile'
        },
        {
          customId: 'customer_year_quota_control',
          text: '客户年度总配额控制',
          link: '/quota/customeryearquota/list',
        },
        {
          customId: 'quota_assess_year_config',
          text: '配额考核年度设置',
          link: '/quota/quotaassessyear/list',
        },
        {
          customId: 'quota_Import',
          text: '配额导入',
          link: '/quota/stockcheck/quotaImportList',
        },
        {
          customId: 'quota_adjust',
          text: '配额调整',
          link: '/quota/adjust/list',
        },
      ]
    },
    {
      customId: 'report_detail',
      text: '报表',
      link: '/report',
      icon: '',
      items: [
        {
          customId: 'api_v1_quota_mgmt_report_inventoryCustomerNumber',
          text: '盘点客户数量统计报表',
          link: '/report/stockcustomercountreport',
        },
        {
          customId: 'api_v1_quota_mgmt_report_stock',
          text: '库存明细报表',
          link: '/report/stockdetailreport',
        },
        {
          customId: 'api_v1_quota_mgmt_report_statisticsCustomer',
          text: '配额统计报表（客户维度）',
          link: '/report/quotareport/customerdimension',
        },
        {
          customId: 'api_v1_quota_mgmt_report_customerDimensionQuery',
          text: '配额统计报表（客户维度累计查询）',
          link: '/report/quotareport/customerdimensiontotalsearch',
        },
        {
          customId: 'api_v1_quota_mgmt_report_areaAndQuotasMaterial',
          text: '配额统计报表（片区+配额物料分类维度）',
          link: '/report/quotareport/areaandquota',
        },
        {
          customId: 'api_v1_quota_mgmt_report_areaAndCustomer',
          text: '配额统计报表（物料分类+客户维度）',
          link: '/report/quotareport/matterandcustomer',
        },
        {
          customId: 'api_v1_quota_mgmt_report_quota_request',
          text: '配额统计报表',
          link: '/report/quotaapllyreport',
        },
        {
          customId: 'api_v1_quota_mgmt_report_materialAndCustomer',
          text: '配额统计报表（片区+客户维度）',
          link: '/report/quotareport/areaandcustomer',
        },
      ]
    },
    {
      customId: 'points_manage',
      text: '积分管理',
      link: '/systemSettings',
      icon: 'setting',
      items: [
        {
          customId: 'isolation_manage',
          text: '隔离管理',
          link: '/SystemSettings/capitalCost/list',
        },
        {
          customId: 'rebate_rule_config',
          text: '返利规则配置',
          link: '/SystemSettings/capitalCost/list',
        },
        {
          customId: 'points_assessment_cycle_config',
          text: '积分考核周期配置',
          link: '/SystemSettings/capitalCost/list',
        },
        {
          customId: 'points_redemption_times_config',
          text: '积分兑换次数配置',
          link: '/SystemSettings/capitalCost/list',
        },
        {
          customId: 'points_adjustment',
          text: '积分调整',
          link: '/SystemSettings/capitalCost/list',
        },
        {
          customId: 'dealer_points_redemption',
          text: '经销商积分兑换',
          link: '/SystemSettings/capitalCost/list',
        },
        {
          customId: 'points_advance_pay_record',
          text: '积分垫付确认记录',
          link: '/SystemSettings/capitalCost/list',
        },
        {
          customId: 'points_overview',
          text: '积分总览',
          link: '/SystemSettings/capitalCost/list',
        },
        {
          customId: 'points_redemption_report',
          text: '积分兑付报表',
          link: '/SystemSettings/capitalCost/list',
        },
      ]
    },
    {
      customId: 'purchase_management',
      text: '进货管理',
      link: '/purchase-management',
      icon: 'cloud-server',
      items: [
        {
          customId: 'STOCK_LIST',
          text: '进货订单',
          link: '/purchase-management/list',
        },
      ]
    },
    {
      customId: 'funds_management',
      text: '资金管理',
      link: '/funds-management',
      icon: 'gold',
      items: [
        {
          customId: 'funds_management_funds_list',
          text: '我的资金',
          link: '/funds-management/funds-list',
        },
        {
          customId: 'funds_management_margin_list',
          text: '我的保证金',
          link: '/funds-management/margin-list',
        },
      ]
    },
    {
      customId: 'cost_management',
      text: '费用管理',
      link: '/cost-management',
      icon: 'account-book',
      items: [
        {
          customId: 'MY_COST_PAGE',
          text: '我的费用',
          link: '/cost-management/list',
        },
        {
          customId: 'cost_management_reimbursement',
          text: '费用报销进度查询',
          link: '/cost-management/reimbursement',
        },
        {
          customId: 'cost_management_executio_case_record',
          text: '执行案确认记录',
          link: '/cost-management/executio-case-record',

        }
      ]
    },
    {
      customId: 'translation_management',
      text: '合同管理',
      link: '/translation-management',
      icon: 'audit',
      items: [
        {
          customId: 'CONTRACT_LIST',
          text: '我的合同',
          link: '/translation-management/list',
        }
      ]
    },
    {
      customId: 'dailyrecordcontrol_log',
      text: '操作日志',
      link: '/dailyrecord/dailyrecordcontrol',
      icon: 'exception',
    },
  ]
}

let menuRelevants: IMenuRelevants = {
  '_supplier_business_purchase_findListByCommodityProvince': [
    '_supplier_business_purchase_findByStoreAndCity'
  ]
}

let menuExtraPaths: IMenuExtraPath = {
  'qrc_dispatch_data': (path) => path + '?conditions={"dispatchNo":"QD1199953842324418560"}'
}

export { menus, menuRelevants, menuExtraPaths }

